﻿
var status = 0;

function start() {
	status = -1;
	action(1, 0, 0);
}

function action(mode, type, selection) {
	if (mode == -1) {
		cm.dispose();
	} else {
		if (mode == 0 && status == 0) {
			cm.dispose();
			return;
		}
		if (mode == 1)
			status++;
		else
			status--;
		if (status == 0) {
        	var text="#d恭喜您通过了测试，请尽情享受乐趣吧。\r\n";
			text+="#k亲爱的玩家#r#h0##k您好，在这里可以加入门派：\r\n";
			text+="#b#L2091133#我想加入飞龙在天门派。#l\r\n";
			text+="#b#L2091134#我想加入虎啸九天门派。#l\r\n";
			cm.sendSimple(text);
		} else if (status == 1){
			cm.dispose();
			cm.openNpc(selection);
		}
	}
}